{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 导入time\n",
    "import time"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "1536331131.600277"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 获取当前时间戳，以秒为单位\n",
    "time.time()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "datetime.datetime(2018, 9, 7, 22, 38, 52, 288190)"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 导入datetime库\n",
    "from datetime import datetime\n",
    "\n",
    "# 获取当前时间，返回datetime对象\n",
    "datetime.now()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'2018-09-07 22:38:52'"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 格式化显示，以”年-月-日 时:分:秒“格式返回\n",
    "datetime.now().strftime(\"%Y-%m-%d %H:%M:%S\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 导入哈希库\n",
    "import hashlib"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "a4504a3987fd629426acbd6f38bd6fd4\n"
     ]
    }
   ],
   "source": [
    "# md5示例\n",
    "\n",
    "# 初始化md5\n",
    "m = hashlib.md5()\n",
    "\n",
    "# 传入需加密的字符串,字符串需要编码成utf-8格式\n",
    "m.update('使用md5加密的数据'.encode('utf-8'))\n",
    "\n",
    "# 打印加密后的密文\n",
    "print(m.hexdigest())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "4e628c394bfd7c276e40fb70cb09baa62268c10e035b8bad9b6ca04e83f7f7d3\n"
     ]
    }
   ],
   "source": [
    "# SHA256 示例\n",
    "\n",
    "# 初始化SHA256\n",
    "s = hashlib.sha256()\n",
    "\n",
    "# 传入需要加密的字符串，同样需要编码成utf-8格式\n",
    "s.update('使用SHA256加密的数据'.encode('utf-8'))\n",
    "\n",
    "# 打印加密后的密文\n",
    "print(s.hexdigest())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 导入base64库\n",
    "import base64"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "b'5L2g5aW977yM5Yy65Z2X6ZO+'\n"
     ]
    }
   ],
   "source": [
    "data = '你好，区块链'\n",
    "\n",
    "# 对数据进行base64加密\n",
    "result = base64.b64encode(data.encode('utf-8'))\n",
    "\n",
    "# 打印结果\n",
    "print(result)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "你好，区块链\n"
     ]
    }
   ],
   "source": [
    "# 解码，base64加密是可逆的，可以密文还原\n",
    "text = base64.b64decode(result)\n",
    "\n",
    "print(text.decode('utf-8'))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 导入椭圆加密算法\n",
    "from ecdsa import SigningKey, SECP256k1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 生成私钥\n",
    "sk = SigningKey.generate(curve=SECP256k1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 生成公钥\n",
    "vk = sk.get_verifying_key()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 生成签名\n",
    "signature = sk.sign(\"Something\".encode(\"utf-8\"))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "True"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 验证签名\n",
    "vk.verify(signature, \"Something\".encode(\"utf-8\"))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 导入绘图库\n",
    "import matplotlib.pyplot as plt\n",
    "import numpy as np"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYYAAAD8CAYAAABzTgP2AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvIxREBQAAIABJREFUeJzt3XlYlXX+//Hnmx0RQQRxAUEFVzRU3HKpXFKnRm0qJxvLGsua9m1G+9VMU1N9q/m22V46k622WWmZ+5JlprijyCJu4AJqooDsn98fHPuCoSznwH0O5/24rnN5zn3um/Oia+a8+NzbR4wxKKWUUmd5WB1AKaWUc9FiUEopVYUWg1JKqSq0GJRSSlWhxaCUUqoKLQallFJVaDEopZSqQotBKaVUFVoMSimlqvCyOkB9hIaGmujoaKtjKKWUS9m0adMxY0xYTeu5ZDFER0eTmJhodQyllHIpIrK/NuvpriSllFJVaDEopZSqQotBKaVUFVoMSimlqtBiUEopVYVDikFE/iMi2SKSdJ73RURmiUi6iGwXkb6V3psqImm2x1RH5FFKKVV/jhoxvAuMvcD744BY22M68AaAiI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UnW03zFYgG1hmjHG13+El4G9AudVB7GCApSKyyTYXvCvpCOQA/7XtzpstIgFWhzqXOxWDcgIi0hz4ArjPGHPK6jx1ZYwpM8bEUzFH+QARcZndeiJyJZBtjNlkdRY7DTXG9AXGAXfadrO6Ci+gL/CGMaYPkA843fFOdyqGLCCy0usI2zLVSGz75b8APjTGzLc6jz1sw/9VwFirs9TBEGC8bR/9PGCEiHxgbaS6M8Zk2f7NBr6kYjexq8gEMiuNND+noiicijsVw0YgVkQ62g74XAcssDiT27AduJ0DJBtjXrA6T32ISJiIBNue+1NxIsNua1PVnjHmYWNMhDEmmor//a80xkyxOFadiEiA7eQFbLtgLgdc5kw9Y8wR4KCIdLUtGgk43QkYXlYHaCzGmFIRuQtYAngC/zHG7LQ4Vq2JyMfApUCoiGQCjxlj5libqk6GADcAO2z76AH+nzFmkYWZ6qotMNd2hpsH8KkxxiVP+XRh4cCXFX9n4AV8ZIxZbG2kOrsb+ND2B2oGcLPFeX7DbU5XVUopVTvutCtJKaVULWgxKKWUqkKLQSmlVBVaDEopparQYlBKKVWFFoNSSqkqtBiUUkpVocWglFKqiv8PcgK+sX4dUx8AAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# 生成数据\n",
    "x = np.linspace(0, 2 * np.pi, 50)\n",
    "\n",
    "# 绘制图表\n",
    "plt.plot(x, np.sin(x)) \n",
    "\n",
    "# 显示图形\n",
    "plt.show()              "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
